package com.ctrip.demo.design.template;

/**
 * @author xs.wu
 */
public abstract class AbstractAccount {


    /**
     * 计算利率
     * @return
     */
    protected abstract double calculateInterest();

    public void factAccount() {

        System.out.println(totalAccount() * calculateInterest());

    }

    public double totalAccount() {
        return 1000;
    }


}
